<?php

/**
 * Class used to interact with roles returned by EVE Miscelaneous API.
 *
 * @package eveApi
 *
 */

/**
 * Include the file that provides the eveapi class
 *
 */
require_once('eveapi.class.php');

/**
 * class Misc
 * @package eveApi
 *
 */
class Misc extends eveapi{
	
	/**
	* getServerStatus
	* 
	* @return object xmlObject SimpleXMLObject generated from API XML
	* 
	*/
	function getServerStatus(){
		$path = "/server/ServerStatus.xml.aspx/";
		$content = $this->retreiveXML($path);
		return $content;
	}
	
	/**
	* getPortrait
	* Gets a portrait based on type using id
	* 
	* @param int id
	* @param string type
	*
	* @return string XML from API
	* 
	*/
	function getPortrait($id,$type = "character"){
		//Type can be character, corporation or alliance
		if(($character != "character") || ($character != "corporation") || ($character != "alliance")){
			$this->addMsg("getPortrait", "Invalit type (".$type.") Specified", __FILE__, __LINE__);
			return false;
		}
		if(!is_int($id)){
			$this->addMsg("getPortrait", "Invalid ID (".$id.") specified", __FILE__, __LINE__);
			return false;
		}
		$path = "http://image.eveonline.com/".$type."/".$id;
		return $this->retreiveXML($path);
	}	
	
}


?>